<?php
 
//数据库配置设置，判断环境
$appengine_config = array();

//for jd app engine
if (isset($_ENV["JAE_MYSQL_USERNAME"])) {
    $appengine_config['DB_HOST'] = $_ENV["JAE_MYSQL_IP"]; // 服务器地址
    $appengine_config['DB_NAME'] = $_ENV["JAE_MYSQL_DBNAME"]; // 数据库名
    $appengine_config['DB_USER'] = $_ENV["JAE_MYSQL_USERNAME"]; // 用户名
    $appengine_config['DB_PWD'] = $_ENV["JAE_MYSQL_PASSWORD"]; // 密码
    $appengine_config['DB_PORT'] = $_ENV["JAE_MYSQL_PORT"]; // 端口
    $appengine_config['DB_ENCODEING'] = $_ENV["JAE_MYSQL_ENCODING"]; // 编码
} else if (isset($_ENV["SAE_MYSQL_USER"])) {
    $appengine_config['DB_HOST'] = $_ENV["SAE_MYSQL_HOST_M"]; // 服务器地址
    $appengine_config['DB_NAME'] = $_ENV["SAE_MYSQL_DB"]; // 数据库名
    $appengine_config['DB_USER'] = $_ENV["SAE_MYSQL_USER"]; // 用户名
    $appengine_config['DB_PWD'] = $_ENV["SAE_MYSQL_PASS"]; // 密码
    $appengine_config['DB_PORT'] = $_ENV["SAE_MYSQL_PORT"]; // 端口 
} else if (isset($_ENV["MOPAAS_MYSQL6352_USER"])) {
    $appengine_config['DB_HOST'] = $_ENV["MOPAAS_MYSQL6352_HOST"]; // 服务器地址
    $appengine_config['DB_NAME'] = $_ENV["MOPAAS_MYSQL6352_NAME"]; // 数据库名
    $appengine_config['DB_USER'] = $_ENV["MOPAAS_MYSQL6352_USER"]; // 用户名
    $appengine_config['DB_PWD'] = $_ENV["MOPAAS_MYSQL6352_PASSWORD"]; // 密码
    $appengine_config['DB_PORT'] = $_ENV["MOPAAS_MYSQL6352_PORT"]; // 端口 
} else {
    $appengine_config['DB_HOST'] = '127.0.0.1'; // 服务器地址
    $appengine_config['DB_NAME'] = 'jingpin'; // 数据库名
    $appengine_config['DB_USER'] = 'root'; // 用户名
    $appengine_config['DB_PWD'] = '123123'; // 密码
    $appengine_config['DB_PORT'] = '3306'; // 端口
}
$base = array(
    /* 模块相关配置 */
     
    'DEFAULT_MODULE'     => 'Home',
    'MODULE_DENY_LIST'   => array('Common'),
    'DEFAULT_THEME' => 'default',
    /* 模板相关配置 */
    'TMPL_PARSE_STRING' => array(
        '__IMG__' => __ROOT__ . '/s/img',
        '__CSS__' => __ROOT__ . '/s/css',
        '__JS__' => __ROOT__ . '/s/js',
    ),
    'SESSION_PREFIX' => 'smartsign_home', //session前缀
    'COOKIE_PREFIX' => 'smartsign_home_', // Cookie前缀 避免冲突
    'DB_SQL_LOG' => true,



    /* 系统数据加密设置 */
    'DATA_AUTH_KEY' => 'rDUe!X_d}6`W4@J2^1.0gSzMI)3Kd]*pk;[TB8?:wRj', //默认数据加密KEY

    /* 调试配置 */
    'SHOW_PAGE_TRACE' => false, 
     
    /* URL配置 */
    'URL_CASE_INSENSITIVE' => true, //默认false 表示URL区分大小写 true则表示不区分大小写
     
    /* 数据库配置 */
    'DB_TYPE' => 'mysql', // 数据库类型 
    'DB_PREFIX' => 'ss_', // 数据库表前缀
);
return array_merge($base, $appengine_config);
